package hcn.protocol.brandnew.dengji.jianchayuyue;

import hcn.protocol.registration.xml.resp.QueryPatientListResp;
import lombok.Data;

import javax.xml.bind.annotation.*;
import java.util.List;


/**
 * 检查预约状态信息更新服务-响应消息（成功） - ODS_02070002_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class QueryPatientListResponse {
    /**
     * 总数
     */
    private String total;
    private List<QueryPatientListResp.PatientList> patientLists;

    @XmlElement(name = "Total")
    public String getTotal() {
        return total;
    }

    public void setTotal(String total) {
        this.total = total;
    }

    @XmlElementWrapper(name = "PatientLists")
    @XmlElement(name = "PatientList")
    public List<QueryPatientListResp.PatientList> getPatientLists() {
        return patientLists;
    }

    public void setPatientLists(List<QueryPatientListResp.PatientList> patientLists) {
        this.patientLists = patientLists;
    }


    @XmlRootElement(name = "PatientList")
    public static class PatientList {
        /**
         * 区域内患者唯一标识
         */
        private String MPI;
        /**
         * 业务系统患者档案ID
         * 业务系统内部患者档案的唯一编号，考虑各业务系统通用，门诊档案填门诊号码，住院档案填住院号
         */
        private String sourcePatientId;
        /**
         * 业务系统患者档案类型
         * 标识病人在业务系统内的档案类型。枚举值：OV:门诊档案 IV:住院档案 HV:体检档案 LG:留观档案 TV:其他档案
         */
        private String sourcePatientIdType;
        /**
         * 建档机构代码
         * 经《医疗机构执业许可证》登记的，并按照特定编码体系填写的代码WS_218
         */
        private String authorOrganization;
        /**
         * 建档机构名称
         */
        private String authorOrganizationName;
        private String idCardCode;
        private String idCard;
        /**
         * 医疗保险类别代码
         * 患者本人参加的医疗保险的类别在特定编码体系中的代 码CV02_01_204
         */
        private String medicalInsuranceCategoryCode;
        private List<QueryPatientListResp.MedicalCardInfo> medicalCardInfos;
        /**
         * 建卡（更新）日期时间
         */
        private String effectiveTime;
        /**
         * 患者姓名
         */
        private String name;
        /**
         * 性别代码
         */
        private String sex;
        /**
         * 出生日期
         */
        private String birthDate;
        /**
         * 婚姻状况代码
         * 表示患者当前婚姻状况的代码GB_T2261_2
         */
        private String maritalStatus;
        /**
         * 民族
         * 表示患者所属民族类别在特定编码体系中的代码GB_T3304
         */
        private String ethnicGroup;
        /**
         * 职业类别代码
         * 标识患者当前的从业状况的代码GB_T2261_4
         */
        private String occupationCategoryCode;
        /**
         * 患者电话号码
         * 患者联系电话的号码，包括国际、国内区号和分机号
         */
        private String patientPhone;
        /**
         * 工作单位名称
         * 本人或联系人当前工作单位的组织机构名称
         */
        private String workUnit;
        /**
         * 工作单位电话号码
         * 指患者当前工作单位的联系电话号码，包括国际、国内区号和分机号
         */
        private String workAddrPhone;
        /**
         * 建卡者代码
         * 医疗机构职工在特定编码体系中的编码CU_Personnel
         */
        private String authorId;
        /**
         * 建卡者姓名
         * 首次为患者建立电子病历者在公安户籍管理部门正式登记注册的姓氏和名称
         */
        private String author;
        /**
         * 地址
         */
        private QueryPatientListResp.Address address;
        /**
         * 联系方式
         */
        private QueryPatientListResp.Contact contact;

        @XmlElement(name = "MPI")
        public String getMPI() {
            return MPI;
        }

        public void setMPI(String MPI) {
            this.MPI = MPI;
        }

        @XmlElement(name = "SourcePatientId")
        public String getSourcePatientId() {
            return sourcePatientId;
        }

        public void setSourcePatientId(String sourcePatientId) {
            this.sourcePatientId = sourcePatientId;
        }

        @XmlElement(name = "SourcePatientIdType")
        public String getSourcePatientIdType() {
            return sourcePatientIdType;
        }

        public void setSourcePatientIdType(String sourcePatientIdType) {
            this.sourcePatientIdType = sourcePatientIdType;
        }

        @XmlElement(name = "AuthorOrganization")
        public String getAuthorOrganization() {
            return authorOrganization;
        }

        public void setAuthorOrganization(String authorOrganization) {
            this.authorOrganization = authorOrganization;
        }

        @XmlElement(name = "AuthorOrganizationName")
        public String getAuthorOrganizationName() {
            return authorOrganizationName;
        }

        public void setAuthorOrganizationName(String authorOrganizationName) {
            this.authorOrganizationName = authorOrganizationName;
        }

        @XmlElement(name = "IdCardCode")
        public String getIdCardCode() {
            return idCardCode;
        }

        public void setIdCardCode(String idCardCode) {
            this.idCardCode = idCardCode;
        }

        @XmlElement(name = "IdCard")
        public String getIdCard() {
            return idCard;
        }

        public void setIdCard(String idCard) {
            this.idCard = idCard;
        }

        @XmlElement(name = "MedicalInsuranceCategoryCode")
        public String getMedicalInsuranceCategoryCode() {
            return medicalInsuranceCategoryCode;
        }

        public void setMedicalInsuranceCategoryCode(String medicalInsuranceCategoryCode) {
            this.medicalInsuranceCategoryCode = medicalInsuranceCategoryCode;
        }

        @XmlElementWrapper(name = "MedicalCardInfos")
        @XmlElement(name = "MedicalCardInfo")
        public List<QueryPatientListResp.MedicalCardInfo> getMedicalCardInfos() {
            return medicalCardInfos;
        }

        public void setMedicalCardInfos(List<QueryPatientListResp.MedicalCardInfo> medicalCardInfos) {
            this.medicalCardInfos = medicalCardInfos;
        }

        @XmlElement(name = "EffectiveTime")
        public String getEffectiveTime() {
            return effectiveTime;
        }

        public void setEffectiveTime(String effectiveTime) {
            this.effectiveTime = effectiveTime;
        }

        @XmlElement(name = "Name")
        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        @XmlElement(name = "Sex")
        public String getSex() {
            return sex;
        }

        public void setSex(String sex) {
            this.sex = sex;
        }

        @XmlElement(name = "BirthDate")
        public String getBirthDate() {
            return birthDate;
        }

        public void setBirthDate(String birthDate) {
            this.birthDate = birthDate;
        }

        @XmlElement(name = "MaritalStatus")
        public String getMaritalStatus() {
            return maritalStatus;
        }

        public void setMaritalStatus(String maritalStatus) {
            this.maritalStatus = maritalStatus;
        }

        @XmlElement(name = "EthnicGroup")
        public String getEthnicGroup() {
            return ethnicGroup;
        }

        public void setEthnicGroup(String ethnicGroup) {
            this.ethnicGroup = ethnicGroup;
        }

        @XmlElement(name = "OccupationCategoryCode")
        public String getOccupationCategoryCode() {
            return occupationCategoryCode;
        }

        public void setOccupationCategoryCode(String occupationCategoryCode) {
            this.occupationCategoryCode = occupationCategoryCode;
        }

        @XmlElement(name = "PatientPhone")
        public String getPatientPhone() {
            return patientPhone;
        }

        public void setPatientPhone(String patientPhone) {
            this.patientPhone = patientPhone;
        }

        @XmlElement(name = "WorkUnit")
        public String getWorkUnit() {
            return workUnit;
        }

        public void setWorkUnit(String workUnit) {
            this.workUnit = workUnit;
        }

        @XmlElement(name = "WorkAddrPhone")
        public String getWorkAddrPhone() {
            return workAddrPhone;
        }

        public void setWorkAddrPhone(String workAddrPhone) {
            this.workAddrPhone = workAddrPhone;
        }

        @XmlElement(name = "AuthorId")
        public String getAuthorId() {
            return authorId;
        }

        public void setAuthorId(String authorId) {
            this.authorId = authorId;
        }

        @XmlElement(name = "Author")
        public String getAuthor() {
            return author;
        }

        public void setAuthor(String author) {
            this.author = author;
        }

        @XmlElement(name = "Address")
        public QueryPatientListResp.Address getAddress() {
            return address;
        }

        public void setAddress(QueryPatientListResp.Address address) {
            this.address = address;
        }

        @XmlElement(name = "Contact")
        public QueryPatientListResp.Contact getContact() {
            return contact;
        }

        public void setContact(QueryPatientListResp.Contact contact) {
            this.contact = contact;
        }


    }


    @XmlRootElement(name = "MedicalCardInfo")
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class MedicalCardInfo {
        /**
         * 就诊卡类别代码
         */
        private String MedicalCardType;
        /**
         * 就诊卡号
         */
        private String MedicalCardId;
        /**
         * 就诊卡的状态
         * 就诊卡的状态，其中active-激活；作废-disable；退卡-retired
         */
        private String MedicalCardStatus;

        public String getMedicalCardType() {
            return MedicalCardType;
        }

        public void setMedicalCardType(String medicalCardType) {
            MedicalCardType = medicalCardType;
        }

        public String getMedicalCardId() {
            return MedicalCardId;
        }

        public void setMedicalCardId(String medicalCardId) {
            MedicalCardId = medicalCardId;
        }

        public String getMedicalCardStatus() {
            return MedicalCardStatus;
        }

        public void setMedicalCardStatus(String medicalCardStatus) {
            MedicalCardStatus = medicalCardStatus;
        }
    }


    public static class Address {
        /**
         * 地址全称（非结构化）
         */
        private String addressDetail;
        /**
         * 地址-省（自治区、直辖市）
         * 患者本人或联系人地址中的省、自治区或直辖市名称GB_T2260
         */
        private String province;
        /**
         * 患者本人或联系人地址中的市、地区或州的名称GB_T2260
         */
        private String city;
        /**
         * 患者本人或联系人地址中的县（区）的名称GB_T2260
         */
        private String county;
        /**
         * 患者本人或联系人地址中的乡、镇或城市的街道办事处名称
         */
        private String town;
        /**
         * 患者本人或联系人地址中的村或城市的街、路、里、弄等名称
         */
        private String village;
        /**
         * 患者本人或联系人地址中的门牌号码
         */
        private String houseNumber;
        /**
         * 由阿拉伯数字组成，用来表示与地址对应的邮局及其投递区域的邮政通信代号
         */
        private String postalCode;

        @XmlElement(name = "AddressDetail")
        public String getAddressDetail() {
            return addressDetail;
        }

        public void setAddressDetail(String addressDetail) {
            this.addressDetail = addressDetail;
        }

        @XmlElement(name = "Province")
        public String getProvince() {
            return province;
        }

        public void setProvince(String province) {
            this.province = province;
        }

        @XmlElement(name = "City")
        public String getCity() {
            return city;
        }

        public void setCity(String city) {
            this.city = city;
        }

        @XmlElement(name = "County")
        public String getCounty() {
            return county;
        }

        public void setCounty(String county) {
            this.county = county;
        }

        @XmlElement(name = "Town")
        public String getTown() {
            return town;
        }

        public void setTown(String town) {
            this.town = town;
        }

        @XmlElement(name = "Village")
        public String getVillage() {
            return village;
        }

        public void setVillage(String village) {
            this.village = village;
        }

        @XmlElement(name = "HouseNumber")
        public String getHouseNumber() {
            return houseNumber;
        }

        public void setHouseNumber(String houseNumber) {
            this.houseNumber = houseNumber;
        }

        @XmlElement(name = "PostalCode")
        public String getPostalCode() {
            return postalCode;
        }

        public void setPostalCode(String postalCode) {
            this.postalCode = postalCode;
        }
    }

    public static class Contact {
        /**
         * 指联系人与患者之间的关系代码GB_T4761
         */
        private String relationShipWithPatient;
        /**
         * 联系人在公安户籍管理部门正式登记注册的姓氏和名称
         */
        private String contactPerson;
        /**
         * 指联系人的联系电话号码，包括国际、国内区号和分机号
         */
        private String contactPersonTel;
        /**
         * 监护人电话号码
         */
        private String guardianMobile;
        /**
         * 监护人身份证件号码
         */
        private String guardianIdCardId;
        /**
         * 监护人身份证件类别代码
         */
        private String guardianIdCardType;
        /**
         * 监护人姓名
         */
        private String guardianName;

        @XmlElement(name = "RelationShipWithPatient")
        public String getRelationShipWithPatient() {
            return relationShipWithPatient;
        }

        public void setRelationShipWithPatient(String relationShipWithPatient) {
            this.relationShipWithPatient = relationShipWithPatient;
        }

        @XmlElement(name = "ContactPerson")
        public String getContactPerson() {
            return contactPerson;
        }

        public void setContactPerson(String contactPerson) {
            this.contactPerson = contactPerson;
        }

        @XmlElement(name = "ContactPersonTel")
        public String getContactPersonTel() {
            return contactPersonTel;
        }

        public void setContactPersonTel(String contactPersonTel) {
            this.contactPersonTel = contactPersonTel;
        }

        @XmlElement(name = "GuardianMobile")
        public String getGuardianMobile() {
            return guardianMobile;
        }

        public void setGuardianMobile(String guardianMobile) {
            this.guardianMobile = guardianMobile;
        }

        @XmlElement(name = "GuardianIdCardId")
        public String getGuardianIdCardId() {
            return guardianIdCardId;
        }

        public void setGuardianIdCardId(String guardianIdCardId) {
            this.guardianIdCardId = guardianIdCardId;
        }

        @XmlElement(name = "GuardianIdCardType")
        public String getGuardianIdCardType() {
            return guardianIdCardType;
        }

        public void setGuardianIdCardType(String guardianIdCardType) {
            this.guardianIdCardType = guardianIdCardType;
        }

        @XmlElement(name = "GuardianName")
        public String getGuardianName() {
            return guardianName;
        }

        public void setGuardianName(String guardianName) {
            this.guardianName = guardianName;
        }
    }

}
